import Vue from 'vue'
import App from './App.vue'
Vue.config.productionTip = false
import TypeNav from './components/TypeNav'
import Pagination from './components/Pagination'
Vue.component(TypeNav.name, TypeNav)
Vue.component(Pagination.name, Pagination)
import { Button,MessageBox } from 'element-ui';
Vue.use(Button)
Vue.prototype.$msgbox = MessageBox;
Vue.prototype.$alert = MessageBox.alert;
// 引入路由
import router from './router'
//引入仓库
import store from './store'
//引入MoceServe.js
import './mock/mockServe'
//映入swiper样式
import "swiper/css/swiper.css"
//统一引入
import * as API from './api'
//图片蓝加载
import VueLazyLoad  from 'vue-lazyload'
import lazy from './assets/lazy.jpg'
Vue.use(VueLazyLoad,{
  loading:lazy
})
//表单验证插件
import  './plugins/validate'
new Vue({
  render: h => h(App),
  beforeCreate() {
    Vue.prototype.$bus = this
    Vue.prototype.$API = API
  },
  router,
  store
}).$mount('#app')